package answer.modules.service.impl;

import answer.modules.model.Users;
import answer.modules.mapper.UsersMapper;
import answer.modules.service.IUsersService;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author CBY
 * @since 2019-01-04
 */
@Service
public class UsersServiceImpl extends ServiceImpl<UsersMapper, Users> implements IUsersService {
    @Autowired
    private UsersMapper usersMapper;

    @Override
    public List<Users> selectAllUser() throws Exception {
        EntityWrapper<Users> ew = new EntityWrapper<>();
        ew.setEntity(new Users());
        List<Users> list = usersMapper.selectList(ew);
        return list;
    }
}
